package com.lelefly.base.controller;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lelefly.base.po.UavMissionTj;


@Controller
@RequestMapping("/test")
public class TestController {

	@Resource
	private JdbcTemplate jdbcTemplate;
	
	 @RequestMapping("/api/getTest")
	 @ResponseBody
	 public Object getTest(){
		 String sqlString  = "select  COUNT(1) from dual ";
		 
		 int  count = jdbcTemplate.queryForInt(sqlString);
		 return "hello"+count;
	 }
}
